﻿using Microsoft.TeamFoundation.VersionControl.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace SearchForWorkitemsChanges
{
    /// <summary>
    /// Helper on TFS API
    /// </summary>
   internal static class TfsHelpers
    {
        /// <summary>
        /// Converts a date to a <see cref="VersionSpec"/>.
        /// </summary>
        /// <param name="date">The specified date.</param>
        /// <returns></returns>
       public static VersionSpec ConvertToVersionSpec(this DateTime date)
       {
           return VersionSpec.ParseSingleSpec(string.Format("D{0:yyy}-{0:MM}-{0:dd}T{0:HH}:{0:mm}", date), "");
       }
    }
}
